﻿@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Defaults.cshtml";
}

<div ng-app="app" ng-controller="DemoCtrl">                    
     <div class="row-fluid">
         <div class="span6">
             <div id="DataTables_Table_0_length" class="dataTables_length" ng-show="showAdd()">
                    <a class="btn btn-info" ng-click="testDialog(false,null)">
										    <i class="glyphicon glyphicon-plus icon-white"></i>  
										    Thêm mới                                           
	                </a>
             </div>

         </div>
         <div class="span6">
            
             <div class="control-group">							  
							  <div class="controls">
                                <div class="search">
                                    Tìm : <input type="text" ng-model="search.$" />
                                </div>								
							  </div>
						</div>
         </div>

     </div>
     <table class="table table-striped table-bordered bootstrap-datatable datatable">
            <tr>
                <th>Tên</th>
                <th></th>
            </tr>
            <tr ng-repeat="talk in talks | orderBy : 'cHUCVUBTV' | filter:search">
                <td> {{talk.cHUCVUBTV}}</td>
                 <td class="center">
                     <div ng-show="showEdit()">                     
                    <a class="btn btn-info" ng-click="testDialog(true,talk)">
										<i class="icon-edit icon-white"></i>  
										Sửa                                            
									</a>
                         </div>
                     <div ng-show="showDelete()">
									<a class="btn btn-danger" ng-click="delete(talk.iD)">
										<i class="icon-trash icon-white"></i> 
										Xóa
									</a>
                         </div>
                </td>   
            </tr>
        </table>

        <div ng-controller="DialogCtrl">
            <jqdialog dialog-name="Test" title="'Ban thường vụ'"
                      auto-open="false" width="800" height="450"
                      on-open="onOpen" buttons="{'Lưu': onOk, 'Hủy': onCancel, 'Đóng': 'close' }"
                      args-to-scope="true"
                      before-close="beforeClose">
                <h3>Thông tin</h3>
                <div>
                    <form class="form-horizontal">
                    <fieldset>
                        <div class="control-group">
							  <label class="control-label" for="cHUCVUBTV">Tên : </label>
							  <div class="controls">
								<input id="cHUCVUBTV" ng-model="obj.cHUCVUBTV"/>						
							  </div>
						</div>
                        <div class="control-group">
							  <label class="control-label" for="moTaBTV">Mô tả :</label>
							  <div class="controls">								
                                 <textarea class="cleditor" id="moTaBTV" rows="3" value="demo"></textarea>
							  </div>
							</div>
                    </fieldset>
                                                                
                </form>
                </div><!-- end box-content -->
                
                
                                
            </jqdialog>
        </div>

 </div>
<!--
<script src="~/Content/lib/jquery-1.8.3.js"></script> -->
<script src="~/Content/lib/jquery-ui.js"></script>
<script src="~/Content/lib/angular.js"></script>
<script src="~/Content/lib/module.js"></script>
<script src="~/Content/js/jqdialog/jqdialog.js"></script>
<script src="~/Content/md/btv/btv.js"></script>
<script>
    $("#dscv").html("Danh Sách Ban Thường Vụ");
</script>

